<?php

import("data.db.product.DbProduct");

class Product extends DbProduct {
	
	public function __construct($noinit=false) {
		parent::__construct($noinit);
	}
	
	function getProductProperty($unitProperty) {
		$list = self::getProductProperties();
		foreach ($list as $k=>$item) {
			if ($unitProperty->getId()==$item->getUnitPropertyId()) {
				return $list[$k];
			}
		}
		return null;
	}
	
	function getImageItem($type) {
		$list = self::getImageItems();
		foreach ($list as $k=>$item) {
			if ($type==$item->getType()) {
				return $list[$k];
			}
		}
		return null;
	}
}
?>